<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>六西格玛知识管理</title>
<link href="<?php echo $this->baseUrl ?>/public/style/style.css" rel="stylesheet" type="text/css" />
<link href="<?php echo $this->baseUrl ?>/public/style/daterangepicker.css" rel="stylesheet" type="text/css" />
<link href="<?php echo $this->baseUrl ?>/public/style/jquery-ui.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="<?php echo $this->baseUrl ?>/public/scripts/jquery.js"></script>
<script type="text/javascript" src="<?php echo $this->baseUrl ?>/public/scripts/daterangepicker.js"></script>
<script type="text/javascript" src="<?php echo $this->baseUrl ?>/public/scripts/jquery-ui.js"></script>
<script type="text/javascript" src="<?php echo $this->baseUrl ?>/public/fckeditor/fckeditor.js"></script>
</head>

<body>
<!--头部-->
<?php echo $this->partial('common/header.html', array('template'=>$this->template, 'baseUrl'=>$this->baseUrl)); ?>

<!--主体-->
<div class="main-box" id="mainBox">
    <div class="third-menu">
        <?php echo $this->partial('common/operation.html', array('template'=>$this->template,'uid'=>$this->company[0]['user_id'], 'baseUrl'=>$this->baseUrl, 'id'=>$_GET['company_id'])); ?>
        <div class="menu-title"><span class="icon"></span>客户详细信息页</div>
    </div>
  
    <div class="separate-line"></div>
    <div class="main-form">
        <div class="project-show">
            <h2 class="project-title"><?php echo $this->company[0]['name']; ?></h2>
            <div class="student-info" style="height:180px">
            	<div class="student-introduce">
                	<ul style="padding-left:30px; float:left">
                	    <li>&nbsp;&nbsp;&nbsp;&nbsp;类别：
                        	<?php foreach ($this->conf->companyType as $key => $val): ?>
                                <?php if($this->company[0]['category']==$key): ?><?php echo $val; ?><?php endif; ?>
                            <?php endforeach; ?>
                        </li>
                    	<li>&nbsp;&nbsp;&nbsp;&nbsp;代号：
                        	<?php echo !empty($this->company[0]['mark'])?$this->company[0]['mark']:'未填写'; ?>
                        </li>
                        <li>&nbsp;&nbsp;&nbsp;&nbsp;简称：
                            <?php echo !empty($this->company[0]['short_name'])?$this->company[0]['short_name']:'未填写'; ?>
                    	</li>
                        
                        <li>&nbsp;&nbsp;&nbsp;&nbsp;地点：
                            <?php echo $this->company[0]['city']; ?>&nbsp;&nbsp;<?php echo $this->company[0]['location']; ?>
                        </li>
                        <li>员工总数：
                        	<?php echo !empty($this->company[0]['staff_num'])?$this->company[0]['staff_num']:'未填写'; ?>
                        </li>
                        <li>历年产值：
                        	<?php echo !empty($this->company[0]['value_num'])?$this->company[0]['value_num']:'未填写'; ?>
                        </li>
                        <li>人均产值：
                            <?php if($this->company[0]['staff_num']!=0){echo $this->company[0]['value_num']/$this->company[0]['staff_num'];}else{echo "0";} ?>
                        </li>
                    </ul>
                    <ul style="padding-left:30px; float:left">
                    	<li>总经理：
                        	<?php echo !empty($this->company[0]['manager'])?$this->company[0]['manager']:'未填写'; ?>
                        </li>
                        <li>副总经理：
                            <?php echo !empty($this->company[0]['ass_manager'])?$this->company[0]['ass_manager']:'未填写'; ?>
                    	</li>
                        <li>LSS负责人：
                            <?php echo !empty($this->company[0]['lss_manager'])?$this->company[0]['lss_manager']:'未填写'; ?>
                        </li>

                        <li>联系人及电话：
                        	<?php echo $this->company[0]['linkman']; ?>&nbsp;&nbsp;<?php echo $this->company[0]['phone']; ?>
                        </li>
                        <li>推进部门电话：
                        	<?php echo !empty($this->company[0]['department_phone'])?$this->company[0]['department_phone']:'未填写'; ?>
                        </li>
                        <li>传真：
                        	<?php echo !empty($this->company[0]['fox'])?$this->company[0]['fox']:'未填写'; ?>
                        </li>
                        <li>专职黑带：
                        	<?php echo !empty($this->company[0]['bb_name'])?$this->company[0]['bb_name']:'未填写'; ?>
                        </li>
                    </ul>  
                </div>
            </div>
            <div class="project-desc">
            	<div class="project-border">
            	单位简介：<?php echo !empty($this->company[0]['summary'])?$this->company[0]['summary']:'暂无信息'; ?>
            	</div>
            </div>
        </div>
        
        <?php if($this->students): ?>
        <div class="project-show">
        	<div class="project-desc">
            <div class="project-border">
                <dl class="class-info">
                    <dd>
                    <table width="760">
                    <tr align="center">
                    	<th width="25%">学员姓名</th>
                    	<th width="25%">学员类别</th>
                        <th width="50%">学员简介</th>
                    </tr>
                    <?php foreach ($this->students as $key => $val): ?>
                        <tr align="center">
                        	<td><a href="<?php echo $this->baseUrl ?>/student/detail?student_id=<?php echo $val['student_id']; ?>" target="_blank"><?php echo $val['name']; ?></a></td>
                            <td>
                            <?php foreach ($this->conf->projectType as $ke => $va): ?>
                            <?php if($val['category']==$ke) echo $va;?>
                            <?php endforeach; ?>
                            </td>
                            <td><?php echo $val['summary']; ?></td>
                        </tr>
                    <?php endforeach; ?>
                    </table>
                    </dd>
                </dl>
          <div class="page-bar2">
                <div>总数：<span class="total-count"><?php echo $this->stu_total ?></span></div>
                <div>
                <?php if ($this->stu_page > 1): ?>
                <a href="<?php echo $this->baseUrl ?>/company/detail?company_id=<?php echo $this->company[0]['company_id']; ?>&stu_page=1">首页</a>
                <?php else: ?>
                首页
                <?php endif; ?>
                <?php if ($this->stu_page > 1): ?>
                <a href="<?php echo $this->baseUrl ?>/company/detail?company_id=<?php echo $this->company[0]['company_id']; ?>&stu_page=<?php echo $this->stu_page-1 ?>">上一页</a>
                <?php else: ?>
                上一页
                <?php endif; ?>
                <?php if ($this->stu_page < $this->stu_pages): ?>
                <a href="<?php echo $this->baseUrl ?>/company/detail?company_id=<?php echo $this->company[0]['company_id']; ?>&stu_page=<?php echo $this->stu_page+1 ?>">下一页</a>
                <?php else: ?>
                下一页
                <?php endif; ?>
                <?php if ($this->stu_page < $this->stu_pages): ?>
                <a href="<?php echo $this->baseUrl ?>/company/detail?company_id=<?php echo $this->company[0]['company_id']; ?>&stu_page=<?php echo $this->stu_pages ?>">尾页</a>
                <?php else: ?>
                尾页
                <?php endif; ?>
                </div>
                <div>页数：<span class="page-detail"><?php echo $this->stu_page ?>/<?php echo $this->stu_pages ?></span></div>
          	</div>
            </div>
            </div>
            
        </div>

        <?php endif; ?>


        <?php if($this->projects): ?>
        <div class="project-show">
        	<div class="project-desc">
            <div class="project-border">
                <dl class="class-info">
                    <dd>
                    <table width="760">
                    <tr align="center">
                    	<th width="25%">项目名</th>
                        <th width="11%">牵头人</th>
                        <th width="11%">时间</th>
                        <th width="11%">结余</th>
                        <th width="11%">注释</th>
                    </tr>
                    <?php foreach ($this->projects as $key => $val): ?>
                        <tr align="center">
                            <td><a href="<?php echo $this->baseUrl ?>/project/detail?project_id=<?php echo $val['project_id']; ?>" target="_blank"><?php echo $val['title']; ?></a></td>
                            <td><?php echo $val['student_name']; ?></td>
                            <td><?php echo $val['start_time']>0?date("Y.m", $val['start_time']):'未填写'; ?></td>
                            <td><?php echo $val['income']; ?></td>
                            <td><?php if($val['excellence']=="0"){ echo "非优秀项目";}else{ echo "优秀项目";}?></td>
                        </tr>
                    <?php endforeach; ?>
                    </table>
                    </dd>
                </dl>
          <div class="page-bar2">
                <div>总数：<span class="total-count"><?php echo $this->pro_total ?></span></div>
                <div>
                <?php if ($this->pro_page > 1): ?>
                <a href="<?php echo $this->baseUrl ?>/company/detail?company_id=<?php echo $this->company[0]['company_id']; ?>&pro_page=1">首页</a>
                <?php else: ?>
                首页
                <?php endif; ?>
                <?php if ($this->pro_page > 1): ?>
                <a href="<?php echo $this->baseUrl ?>/company/detail?company_id=<?php echo $this->company[0]['company_id']; ?>&pro_page=<?php echo $this->pro_page-1 ?>">上一页</a>
                <?php else: ?>
                上一页
                <?php endif; ?>
                <?php if ($this->pro_page < $this->pro_pages): ?>
                <a href="<?php echo $this->baseUrl ?>/company/detail?company_id=<?php echo $this->company[0]['company_id']; ?>&pro_page=<?php echo $this->pro_page+1 ?>">下一页</a>
                <?php else: ?>
                下一页
                <?php endif; ?>
                <?php if ($this->pro_page < $this->pro_pages): ?>
                <a href="<?php echo $this->baseUrl ?>/company/detail?company_id=<?php echo $this->company[0]['company_id']; ?>&pro_page=<?php echo $this->pro_pages ?>">尾页</a>
                <?php else: ?>
                尾页
                <?php endif; ?>
                </div>
                <div>页数：<span class="page-detail"><?php echo $this->pro_page ?>/<?php echo $this->pro_pages ?></span></div>
          	</div>
            </div>
            </div>
        </div>
        <?php endif; ?>


        <div class="mod-comment">
            <div class="head">评论</div>
            <p class="line"></p>
            <?php if($this->comments): ?>
          	<ul class="comment-list">
            	<?php foreach ($this->comments as $key => $val): ?>
                <li>
                    <span class="user"><?php echo $val['teacher_name'];?>：</span>
                    <span class="score">评分：<font color="#CC0000"><?php echo $val['level']; ?></font></span>
                    <span class="recommend">推荐：
                    <?php 
                    	if($val['recommend']==0){
                        	echo '未选择';
                        }elseif($val['recommend']==1){
                        	echo "<font color='green'>推荐</font>";
                        }elseif($val['recommend']==2){
                        	echo "<font color='red'>不推荐</font>";
                        }
                    ?>
                    </span>
                    <span class="time">评论时间：<i><?php echo date('Y-m-d H:i:s',$val['create_time']); ?></i></span>
                    <div class="content">
                    <?php echo $val['content']; ?>
                    </div>
                </li>
                <?php endforeach; ?>
            </ul>
          	<div class="page-bar">
                <div>总数：<span class="total-count"><?php echo $this->total ?></span></div>
                <div>
                <?php if ($this->page > 1): ?>
                <a href="<?php echo $this->baseUrl ?>/company/detail?company_id=<?php echo $this->company[0]['company_id']; ?>&page=1">首页</a>
                <?php else: ?>
                首页
                <?php endif; ?>
                <?php if ($this->page > 1): ?>
                <a href="<?php echo $this->baseUrl ?>/company/detail?company_id=<?php echo $this->company[0]['company_id']; ?>&page=<?php echo $this->page-1 ?>">上一页</a>
                <?php else: ?>
                上一页
                <?php endif; ?>
                <?php if ($this->page < $this->pages): ?>
                <a href="<?php echo $this->baseUrl ?>/company/detail?company_id=<?php echo $this->company[0]['company_id']; ?>&page=<?php echo $this->page+1 ?>">下一页</a>
                <?php else: ?>
                下一页
                <?php endif; ?>
                <?php if ($this->page < $this->pages): ?>
                <a href="<?php echo $this->baseUrl ?>/company/detail?company_id=<?php echo $this->company[0]['company_id']; ?>&page=<?php echo $this->pages ?>">尾页</a>
                <?php else: ?>
                尾页
                <?php endif; ?>
                </div>
                <div>页数：<span class="page-detail"><?php echo $this->page ?>/<?php echo $this->pages ?></span></div>
          	</div>
            <?php endif; ?>
          
          	<div class="comment-form">
                <form method="post" name="form_commend" action="<?php echo $this->baseUrl?>/comment/add">
                <div class="desc">
                    <input type="hidden" name="cid" value="<?php echo $this->company[0]['company_id'];?>" />
                    <input type="hidden" name="category" value="4" />
                    <input type="hidden" name="template" value="<?php echo $this->template?>" />
                    <span class="float-right">
                        <label for="recommend">推荐：</label>
                        <select name="recommend" class="input-text">
                            <option>请选择...</option>
                            <option value="1">推荐</option>
                            <option value="2">不推荐</option>
                        </select>
                    </span>
                    <label for="score">评分：</label>
                    <select name="score" class="input-text">
                    	<?php foreach ($this->conf->score as $key => $val): ?>
                        <option value="<?php echo $val; ?>"><?php echo $val; ?></option>
                        <?php endforeach; ?>
                    </select>
                </div>
                <p class="content">
                    <label for="content">评论内容：</label>
                    <textarea name="content" class="input-textarea"></textarea>
                </p>
                <p><input type="submit" class="button" value="确认提交" style="margin-left:0" /></p>
            	</form>
          	</div>
        </div>
    </div>
</div>

<!--底部-->
<?php echo $this->partial('common/footer.html') ?>
</body>
</html>
